package com.example.springbootredis.service;


import com.example.springbootredis.entiy.Classroom;

import java.util.List;
import java.util.Optional;

public interface ClassroomService {
    Classroom save(Classroom classroom);
    List<Classroom> findAll();
    Optional<Classroom> findById(Long id);
    void deleteById(Long id);
    List<Classroom> findByCampus(String campus);
    List<Classroom> findByClassroomNameContaining(String classroomName);
    List<Classroom> findByCampusAndClassroomNameContaining(String campus, String classroomName);
    boolean existsByClassroomNo(String classroomNo);
    boolean existsByClassroomName(String classroomName);
    boolean existsByClassroomNoAndIdNot(String classroomNo, Long id);
    boolean existsByClassroomNameAndIdNot(String classroomName, Long id);
}